export function setCookie(key:string,value:string,t?:any){
    var oDate=new Date();
    oDate.setDate(oDate.getDate()+t);
    document.cookie=key+"="+value+"; expires="+oDate.toDateString();
}
export function getCookie(key:string){
    var arr1=document.cookie.split("; ");
    for(var i=0;i<arr1.length;i++){
        var arr2=arr1[i].split("=");
        if(arr2[0]==key){
            return decodeURI(arr2[1]);
        }
    }
}
export function removeCookie(key:string){
    setCookie(key,"",-1); // 把cookie设置为过期
}
